]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
closeDialog: Remove transitions before resetting dialog
authorFlorian Müllner <fmuellner@gnome.org>
Sat, 21 Mar 2020 23:18:13 +0000 (00:18 +0100)
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Mon, 23 Mar 2020 15:27:47 +0000 (15:27 +0000)
On X11, _onFocusChanged() updates the input region, as well as the
reactive-ness of the dialog's buttons.

That method is not only used as signal handlers (which are correctly
disconnected when the dialog is hidden), it also runs when the "show"
transition completes.

That's a problem if the transition is still ongoing when the dialog is
hidden, as it will then only complete when it is replaced by the "hide"
transition, after the this._dialog has been reset to null, and trying
to access the dialog's buttons results in an error.

Avoid this by explicitly removing all transition on hide before
resetting the dialog.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2467

js/ui/closeDialog.js

index 01799bd4ce5a21a95cf46da22c36807c6dfc0e03..63a0bcfcf8d9b14d97dccda9b7b9f11649048838 100644 (file)
@@ -188,6 +188,8 @@ var CloseDialog = GObject.registerClass({
         global.stage.disconnect(this._keyFocusChangedId);
         this._keyFocusChangedId = 0;
 
+        this._dialog._dialog.remove_all_transitions();
+
         let dialog = this._dialog;
         this._dialog = null;
         this._removeWindowEffect();